package com.pj.wisdomlogistics.ui.fragment;


import android.support.v4.app.Fragment;

/**
 * fragment的工厂类
 * zs on 2015/11/3.
 */
public class FragmentFactory {

    /**
     * main
     *
     * @param position
     * @return
     */
    public static Fragment createForMain(int position) {
        Fragment fragment = null;
        switch (position) {
            case 0:
                //fragment = new WisdomLogisticsFragment();
                break;
            case 1:
                //fragment = new ServiceLobbyFragment();
                break;
            case 2:
                fragment = new PersonalCenterFragment();
                break;
        }
        return fragment;
    }

    public static Fragment createForCar(int position) {
        Fragment fragment = null;
        switch (position) {
            case 0:
                fragment = new CarChooseFragment();
                break;
            case 1:
                fragment = new DriverChooseFragment();
                break;

        }
        return fragment;
    }

}
